The present disclosure relates to a variable length decoding apparatus and method. The described apparatus, systems and techniques can be used to rapidly decode an input stream coded in a variable length coding format.
A video codec can be used to compress and encode a given video data and restore the encoded data back to its original video data. Examples of video codec standards include MPEG-1, MPEG-2, H.263, and H.264/MPEG-4. A video codec can provide lossy compression or lossless compression. Variable length coding is an example of the lossless compression scheme. Huffman coding is a type of variable length coding scheme that can be used to encode a given video data for digital transmission by shortening an average length of a code. To decode video data encoded using Huffman type variable length coding, a variable length decoding scheme is used.
A typical variable length decoder is implemented based on a bit-serial method or a look-up table method. A variable length decoder implemented based on the bit-serial method may not require much cost of memory, but the processing time can be too long. A variable length decoder implemented based on the look-up table method can have a fast processing time, but the cost for memory can be high.